package com.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;

import java.util.ArrayList;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author Xz
 * @since 2025-03-10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor

@TableName(value = "sys_menu")
public class SysMenu  {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField( "parent_id")
    private Long parentId;

    @TableField("title")
    private String title;

    @TableField("code")
    private String code;

    @TableField("name")
    private String name;

    @TableField("path")
    private String path;

    @TableField("url")
    private String url;
    //菜单按钮 0，1，2 目录，菜单，按钮
    @TableField("type")
    private String type;
    @TableField( "icon")
    private String icon;
    @TableField( "parent_name")
    private String parentName;
    @TableField( "order_num")
    private Long orderNum;
    @TableField("create_time")
    private String createTime;
    @TableField( "update_time")
    private String updateTime;
    @TableField(exist = false)
    private List<SysMenu> children =new ArrayList<>();
    //给字段不属于数据库 所以排除
    @TableField(exist = false)
    private Boolean open;

}
